/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved.
 * Description: UDK IO for ARM architecture header file
 * Author: -
 * Create: 2021.5.26
 */

#ifndef UDK_IO_ARM_H
#define UDK_IO_ARM_H

#include "stdint.h"
#include "udk_common.h"
#include "udk_membarrier.h"

#define udk_io_wmb() udk_wmb()
#define udk_io_rmb() udk_rmb()
#define udk_io_mb() udk_mb()

static udk_force_inline void udk_write64_relaxed(uint64_t val, volatile void *addr)
{
    asm volatile("str %x[val], [%x[addr]]" : : [ val ] "r"(val), [ addr ] "r"(addr));
}

#endif /* UDK_IO_ARM_H */